package com.zb.service.impl;

import com.zb.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author WEN
 * @Date 2023/7/26 0026
 **/
@Service
public class SetServiceImpl implements SetService {
    @Autowired
    private ZjCodeRegSetService codeRegSetService;
    @Autowired
    private ZjCodeSetService codeSetService;
    @Autowired
    private ZjNetworkSetService networkSetService;
    @Autowired
    private ZjRepairSetService repairSetService;
    @Autowired
    private ZjStoreSetService storeSetService;
    @Autowired
    private ZjSysSetOverallService sysSetOverallService;
    @Autowired
    private ZjUserSetService userSetService;
    @Autowired
    private ZjWorkSetService workSetService;

    // 初始化系统所有设置
    @Override
    public void initSystemSet(Long custAccId) {
        // 系统全局设置
        sysSetOverallService.initDefaultValue(custAccId);
        // 编码设置
        codeSetService.initOrRestoreDefaultCodeSet(custAccId);
        // 编码登记设置
        codeRegSetService.initOrRestoreDefaultCodeRegSet(custAccId);
        // 服务区域设置
        networkSetService.initOrRestoreDefaulNetworkSet(custAccId);
        // 用户设置
        userSetService.initOrRestoreDefaultUserSet(custAccId);
        // 工单设置
        workSetService.initDefaultValue(custAccId);
        // 返厂设置
        repairSetService.initOrRestoreDefaultRepairSet(custAccId);
        // 仓库设置
        storeSetService.initDefaultValue(custAccId);
    }


}
